<?php
if(!isset($GLOBALS['_vars'])) $GLOBALS['_vars'] = array(); 
$fields = array();
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
<title>认领订单列表</title>
<link rel="stylesheet" type="text/css" href="css/base.css">
<script language="javascript" src="../include/js/dedeajax2.js"></script>
<script language="javascript" src="js/ieemu.js"></script>
<script language="javascript" src="js/context_menu.js"></script>
<script language="javascript" src="js/main.js"></script>
<script language="javascript" src="js/list.js"></script>
	<script src="js/jquery-1.11.0.min.js" type="text/javascript"></script>
<script>
    //确认支付操作
    function delete_post(id){
        if(!confirm('确定要做此操作吗？')){
			return false;
		}
        $.ajax({
				type:"post",
				url:"ajax.php",
				async:false,
				data:{
				    id:id,
				    dopost:'delete_post'
				    
				},
				dataType:'json',
				success:function (v) {
					//认领成功
					if (v.status==200){
					  alert(v.msg);
					  location.reload();
					}else{
						alert(v.msg);
					}
				},
				error:function (msg) {
					
					console.log(msg)
				}
			})
        
    }
</script>
</head>
<body leftmargin="8" topmargin="8" background='images/allbg.gif' onLoad="ContextMenu.intializeContextMenu()">

<!--  快速转换位置按钮  -->
<table width="98%" border="0" cellpadding="0" cellspacing="1" bgcolor="#ccd9b9" align="center">
<tr>
 <td height="26" background="images/newlinebg3.gif">
  <table width="98%" border="0" cellspacing="0" cellpadding="0">
  <tr>
  <td align="center">
 </td>
 </tr>
</table>
</td>
</tr>
</table>
  
<!--  内容列表   -->
<form name="form2">
<table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#CFCFCF" align="center" style="margin-top:8px">
<tr bgcolor="#E7E7E7" >
	<td height="28" colspan="14" background="images/tbg.gif" style="padding-left:10px;">
	◆ 邮寄列表
	</td>
</tr>
<tr align="center" bgcolor="#FBFCE2" height="25">
	<td width="4%">ID</td>
	<td width="4%">选择</td>
	<td width="12%">订单号</td>
	<td width="6%">认领人</td>
	<td width="8%">树编号</td>
	<td width="8%">邮寄单号</td>
	<td width="6%">物流名称</td>
	<td width="6%">邮寄时间</td>	
    <td width="6%">收件人</td>
	<td width="6%">收件电话</td>
	<td>收件地址</td>
	<td>邮寄套餐</td>
	<td width="8%">操作</td>
</tr>
<?php
$atts = array();
$atts['tagname'] = 'datalist';
$blockValue = $this->refObj->GetArcList($atts,$this->refObj,$fields); 
if(is_array($blockValue)){
foreach( $blockValue as $key=>$fields )
{
?>
<tr align='center' bgcolor="#FFFFFF" height="26" align="center" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';">
	<td nowrap>
		<?php echo $fields['id']; ?>
	</td>
	<td>
		<input name="arcID" type="checkbox" id="arcID" value="<?php echo $fields['id']; ?>" class="np" />
	</td>
	<td align='left'><span id="arc<?php echo $fields['id']; ?>"><?php
	$oid = $fields['order_tree_id'];
	$query = "select * from orchard_order_tree where id='$oid ' ";
	$row=$dsql->GetOne($query);
	$dingdanid=$row['order_id'];
	$query2 = "select * from orchard_order where id='$dingdanid ' ";
	$row2=$dsql->GetOne($query2);
	echo $row2['order_sn'];
	?></span></td>
	<td>
	<?php
	$a = $fields['user_id'];
	$query = "select * from orchard_user where id='$a' ";
	$row=$dsql->GetOne($query);
	echo $row['name'];
	?>
	</td>
	<td><?php echo $fields['tree_sn']; ?></td>
	<td><?php echo $fields['post_number']; ?></td>
	<td><?php echo $fields['post_type']; ?></td>
    <td><?php echo $fields['post_time']; ?></td>
	<td><?php
	$b = $fields['tree_sn'];
	$query = "select * from orchard_order_tree where tree_sn='$b' ";
	$row=$dsql->GetOne($query);
	echo $row['name'];
	?></td>
	<td><?php echo $row['phone']; ?></td>
	<td><?php echo $row['address']; ?></td>
	<td><?php  if($row['mailingpackage']=='A') echo '10斤/次'; else echo '30斤/次'?></td>
	<td><input type="button" value="删除"  onclick="delete_post(<?php echo $fields['id']; ?>)" ></td>
</tr> 	
<?php
}
}?>
<tr bgcolor="#ffffff">
<td height="36" colspan="14">
	&nbsp;
	<a href="javascript:selAll()" class="coolbg">全选</a>
	<a href="javascript:noSelAll()" class="coolbg">取消</a>
 <a href="javascript:delArc(0)" class="coolbg">&nbsp;删除&nbsp;</a>
	<?php if($channelid==1) echo "	<a href=\"javascript:kwArc(0)\" class=\"coolbg\">&nbsp;自动关键字&nbsp;</a>\r\n"; ?>
 
</td>
</tr>
</form>
<tr align="right" bgcolor="#F9FCEF">
	<td height="36" colspan="14" align="center">
		<?php
$atts = array();
$atts['tagname'] = 'pagelist';
$atts['listsize'] = '3';
 echo $this->refObj->GetPageList($atts,$this->refObj,$fields); 
?>

	</td>
</tr>
</table>

<!--  搜索表单  -->
<form name='form3' action='content_list.php' method='get'>
<input type='hidden' name='dopost' value='listArchives' />
<table width='98%'  border='0' cellpadding='1' cellspacing='1' bgcolor='#cfcfcf' align="center" style="margin-top:8px">
  <tr bgcolor='#EEF4EA'>
    <td background='images/wbg.gif' align='center'>
      <table border='0' cellpadding='0' cellspacing='0' height="32">
        <tr>
          <td width='160'>
          <select name='cid' style='width:150px'>
          <option value='0'>选择栏目...</option>
          	<?php echo $GLOBALS['optionarr']; ?>
          </select>
        </td >
        <td nowrap>
          关键字：
        </td>
        <td width='130'>
          	<input type='text' name='keyword' value='<?php echo $GLOBALS['keyword']; ?>' style='width:120px' />
        </td>
        <td width='90'>
    		<select name='orderby' style='width:80px'>
            <option value='id'>排序...</option>
            <option value='pubdate'>更新时间</option>
            <option value='sortrank'>置顶权值</option>
            <option value='click'>点击量</option>
            <option value='scores'>评论积分</option>
            <option value='lastpost'>最后评论</option>
      	</select>
      </td>
      <td width='90'>
    		<select name='flag' style='width:80px'>
            <option value=''>属性...</option>
            <?php echo $GLOBALS['flagsArr']; ?>
      	</select>
      </td>
       <td>
          <input name="imageField" type="image" src="images/button_search.gif" width="60" height="22" border="0" class="np" />
       </td>
      </tr>
     </table>
   </td>
  </tr>
</table>
</form>

</body>
</html>

	<script src="js/jquery.dialog.js"></script>
	<link rel="stylesheet" type="text/css" href="css/dialog.css">